package com.agent.history;

import com.agent.commons.utils.MailUtil;
import com.agent.commons.utils.MinIOUtil;
import com.agent.feign.config.DefaultFeignConfiguration;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.agent.history.mapper")
@ComponentScan(basePackages = {"com.agent.commons","com.agent.history"},
        //排除commons中不需要自动配置的Bean
        excludeFilters = @ComponentScan.Filter (type = FilterType.ASSIGNABLE_TYPE,classes = {MailUtil.class, MinIOUtil.class} ))
@EnableFeignClients(basePackages = "com.agent.feign.client",defaultConfiguration = DefaultFeignConfiguration.class)
public class AgentHistoryApplication {

    public static void main(String[] args) {
        SpringApplication.run(AgentHistoryApplication.class, args);
    }

}
